package org.ece3574.WTParty;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.inputmethod.InputMethodManager;
import android.widget.Button;
import android.widget.EditText;

public class WriteCommentActivity extends Activity implements OnClickListener{
	
	private EditText Commenttext_;
	private Button Submit_;
	
	public void OnCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);
		//setContentView(R.layout.writecomment);
		
		//Commenttext_ = (EditText) findViewById(R.id.mCommentText);
		Submit_ = (Button) findViewById(R.id.mCommentButton);
		Commenttext_.requestFocus();
		Commenttext_.post((new Runnable() {
            public void run() {
            	InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
        		imm.toggleSoftInput(InputMethodManager.SHOW_FORCED,0);
            }
        }));
        
		Submit_.setOnClickListener(this);
		
	}

	public void onClick(View v) {
		// TODO Auto-generated method stub
		if(v.equals(Submit_)){
			//String UserComment_ = "";
			//UserComment_ = Commenttext_.getText().toString().trim();
			
			// Comment is to be posted on server
	
		}
		
	}

}
